@cyphra/graphql 0.0.0-stage → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +37 -2
- package/dist/index.d.ts +339 -0
- package/dist/index.js +4292 -0
- package/dist/index.js.map +1 -0
- package/package.json +62 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cyphra contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @cyphra/graphql
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Part of [Cyphra](https://www.cyphra.dev), the TypeScript ORM for Neo4j. **GraphQL:** [docs](https://www.cyphra.dev/graphql)
|
|
4
|
+
|
|
5
|
+
Serves the GraphQL API that `@neo4j/graphql` v7 generates from your type definitions (same types,
|
|
6
|
+
fields, filters and results) on the Cyphra runtime, so frontends switch without changing their
|
|
7
|
+
queries.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i @cyphra/graphql graphql neo4j-driver
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { compat } from "@cyphra/graphql";
|
|
15
|
+
|
|
16
|
+
// Before: await new Neo4jGraphQL({ typeDefs, driver }).getSchema()
|
|
17
|
+
const schema = compat.v7.makeSchema({ typeDefs, driver });
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Serve `schema` with GraphQL Yoga, Apollo Server or any GraphQL server.
|
|
21
|
+
|
|
22
|
+
Status (early release):
|
|
23
|
+
|
|
24
|
+
- The full v7 schema is generated; its printed SDL is identical to `@neo4j/graphql` 7.6.8.
|
|
25
|
+
- Read API: list and connection queries, filters, sorting, `limit` / `offset`, cursor pagination,
|
|
26
|
+
nested relationships and connections with edge properties, connection `aggregate` selections and
|
|
27
|
+
aggregation filters.
|
|
28
|
+
- Mutations: `create`, `update`, `delete` with `info` counters, nested `create` / `connect` /
|
|
29
|
+
`disconnect` / `update` / `delete` with edge properties, every update operator (deprecated forms
|
|
30
|
+
included), `@id`, `@timestamp` and `@default`. No APOC needed.
|
|
31
|
+
- One Cypher statement per root field, in its own transaction. Needs Neo4j 5.23+.
|
|
32
|
+
- Not yet: `@authentication` / `@authorization` (#74) and `@cypher` fields (#75). They are in the
|
|
33
|
+
schema and return a `Not implemented yet` error.
|
|
34
|
+
|
|
35
|
+
Compatibility is measured against the real `@neo4j/graphql` by the suite in
|
|
36
|
+
[`compat/graphql`](https://github.com/Cyphra-dev/cyphra/tree/main/compat/graphql).
|
|
37
|
+
|
|
38
|
+
The package also contains `convertGraphQLTypeDefs`, the converter behind `cyphra import graphql`.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { ConstValueNode, GraphQLSchema } from 'graphql';
|
|
2
|
+
import { SchemaDocument, SchemaModel } from '@cyphra/schema';
|
|
3
|
+
import { CyphraClient } from '@cyphra/runtime';
|
|
4
|
+
import { Driver } from 'neo4j-driver';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The mapping from `@neo4j/graphql` v7 type definitions to Cyphra, in one place.
|
|
8
|
+
*
|
|
9
|
+
* Each GraphQL scalar, type-level directive and field-level directive has one entry here. When
|
|
10
|
+
* Cyphra gains a feature (enums, `BigInt`, `Point`, …), supporting it in the importer means
|
|
11
|
+
* changing that entry: the converter in `convert.ts` only walks the SDL and applies these rules.
|
|
12
|
+
*
|
|
13
|
+
* Semantics follow `@neo4j/graphql` 7.x (checked against 7.6.8):
|
|
14
|
+
* - only object types with `@node` are nodes; `@node(labels)` sets the Neo4j labels;
|
|
15
|
+
* - `@id` takes no arguments, is only valid on `ID` fields, autogenerates a UUID and does not
|
|
16
|
+
* create a uniqueness constraint;
|
|
17
|
+
* - `@unique` no longer exists (removed in v7);
|
|
18
|
+
* - `@timestamp(operations)` defaults to `[CREATE, UPDATE]`;
|
|
19
|
+
* - `@relationship(type, direction)` requires both; `properties` names a `@relationshipProperties`
|
|
20
|
+
* object type.
|
|
21
|
+
*
|
|
22
|
+
* @packageDocumentation
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** How serious a report entry is. */
|
|
26
|
+
type ImportSeverity =
|
|
27
|
+
/** Not converted: the type, field or directive is missing from the Cyphra schema. */
|
|
28
|
+
"unsupported"
|
|
29
|
+
/** Converted, but it behaves differently in Cyphra: review it. */
|
|
30
|
+
| "changed"
|
|
31
|
+
/** API-level setting of `@neo4j/graphql` with no effect on the data model. */
|
|
32
|
+
| "ignored";
|
|
33
|
+
/** One line of the import report. */
|
|
34
|
+
type ImportIssue = {
|
|
35
|
+
readonly severity: ImportSeverity;
|
|
36
|
+
/** GraphQL location: `Type` or `Type.field`. */
|
|
37
|
+
readonly at: string;
|
|
38
|
+
/** What it is about, e.g. `@cypher`, `Duration`, `enum`. */
|
|
39
|
+
readonly feature: string;
|
|
40
|
+
readonly message: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Convert `@neo4j/graphql` v7 type definitions (SDL) to a Cyphra {@link SchemaDocument}.
|
|
45
|
+
*
|
|
46
|
+
* Pure: no file system, no printing. Rules for each scalar and directive live in `mappings.ts`;
|
|
47
|
+
* this module walks the SDL, applies them and links relationships.
|
|
48
|
+
*
|
|
49
|
+
* @packageDocumentation
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/** One type definitions file. */
|
|
53
|
+
type GraphQLSource = {
|
|
54
|
+
readonly name: string;
|
|
55
|
+
readonly body: string;
|
|
56
|
+
};
|
|
57
|
+
type GraphQLImportResult = {
|
|
58
|
+
readonly document: SchemaDocument;
|
|
59
|
+
/** Everything that was not converted or behaves differently, in source order. */
|
|
60
|
+
readonly issues: readonly ImportIssue[];
|
|
61
|
+
/**
|
|
62
|
+
* Comment lines to print inside a declaration (keyed by Cyphra declaration name), one per
|
|
63
|
+
* field that was not converted.
|
|
64
|
+
*/
|
|
65
|
+
readonly notes: ReadonlyMap<string, readonly string[]>;
|
|
66
|
+
};
|
|
67
|
+
/** The type definitions are not valid GraphQL (syntax error, unknown type, duplicate type). */
|
|
68
|
+
declare class GraphQLImportError extends Error {
|
|
69
|
+
name: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Convert type definitions to a Cyphra schema document plus a report of what was not
|
|
73
|
+
* converted. Never throws for unsupported features; only for invalid SDL.
|
|
74
|
+
*
|
|
75
|
+
* @param input - SDL text, or several named sources (merged like one document).
|
|
76
|
+
* @throws {GraphQLImportError} On a syntax error, an unknown type or a duplicate type.
|
|
77
|
+
*/
|
|
78
|
+
declare function convertGraphQLTypeDefs(input: string | readonly GraphQLSource[]): GraphQLImportResult;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Print a {@link GraphQLImportResult} as `.cyphra` source, merge it into an existing schema, and
|
|
82
|
+
* format the import report.
|
|
83
|
+
*
|
|
84
|
+
* @packageDocumentation
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The imported schema as a new `.cyphra` file.
|
|
89
|
+
*
|
|
90
|
+
* @param result - Output of {@link convertGraphQLTypeDefs}.
|
|
91
|
+
*/
|
|
92
|
+
declare function printImportedSchema(result: GraphQLImportResult): string;
|
|
93
|
+
/**
|
|
94
|
+
* Merge the imported schema into an existing `.cyphra` source.
|
|
95
|
+
*
|
|
96
|
+
* Existing declarations, fields and comments are kept as written. Fields the existing nodes lack
|
|
97
|
+
* are added at the end of their block; new nodes and relationships are appended. When a field or
|
|
98
|
+
* relationship exists on both sides with a different definition, the existing one wins and an
|
|
99
|
+
* issue says so.
|
|
100
|
+
*
|
|
101
|
+
* @returns The merged source and the extra issues the merge produced.
|
|
102
|
+
* @throws When the existing source does not parse, or the merged schema does not resolve.
|
|
103
|
+
*/
|
|
104
|
+
declare function mergeImportedSchema(existing: string, result: GraphQLImportResult): {
|
|
105
|
+
source: string;
|
|
106
|
+
issues: ImportIssue[];
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* The import report as plain text, grouped by severity. Empty string when there is nothing to
|
|
110
|
+
* report.
|
|
111
|
+
*/
|
|
112
|
+
declare function formatImportReport(issues: readonly ImportIssue[]): string;
|
|
113
|
+
|
|
114
|
+
type ExecutorOptions = {
|
|
115
|
+
/** A `neo4j-driver` driver. */
|
|
116
|
+
driver?: Driver;
|
|
117
|
+
/** Or a Cyphra client (`new CyphraClient(...)`). */
|
|
118
|
+
client?: CyphraClient;
|
|
119
|
+
/** Database name for `driver` (default database when omitted). */
|
|
120
|
+
database?: string;
|
|
121
|
+
/** Log each generated statement and its parameter keys (never values). */
|
|
122
|
+
debug?: boolean;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The `@neo4j/graphql` v7 type definitions, read into the model the v7 API is generated from.
|
|
127
|
+
*
|
|
128
|
+
* Unlike `convertGraphQLTypeDefs` (which maps to a Cyphra schema and drops what Cyphra cannot
|
|
129
|
+
* express), this keeps every detail that changes the generated API: `ID` vs `String`, list element
|
|
130
|
+
* nullability, `@cypher` fields, `@timestamp`, `@default`, relationship property types.
|
|
131
|
+
*
|
|
132
|
+
* @packageDocumentation
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
type TypeRef = {
|
|
136
|
+
/** Named type: a scalar or an enum. */
|
|
137
|
+
readonly name: string;
|
|
138
|
+
readonly list: boolean;
|
|
139
|
+
/** Outer `!`. */
|
|
140
|
+
readonly required: boolean;
|
|
141
|
+
/** `[T!]` (only for lists). */
|
|
142
|
+
readonly elementRequired: boolean;
|
|
143
|
+
};
|
|
144
|
+
type CypherAnnotation = {
|
|
145
|
+
readonly statement: string;
|
|
146
|
+
readonly columnName: string;
|
|
147
|
+
};
|
|
148
|
+
type Attribute = {
|
|
149
|
+
readonly name: string;
|
|
150
|
+
/** Property key in Neo4j (`@alias(property)`), defaults to the field name. */
|
|
151
|
+
readonly property: string;
|
|
152
|
+
readonly type: TypeRef;
|
|
153
|
+
readonly kind: "scalar" | "enum";
|
|
154
|
+
readonly description?: string;
|
|
155
|
+
/** `@id`: generated, not in create/update inputs. */
|
|
156
|
+
readonly id: boolean;
|
|
157
|
+
/** `@default(value)` as a JS value. */
|
|
158
|
+
readonly defaultValue?: unknown;
|
|
159
|
+
/** The raw `@default(value: …)` AST, printed as the input default. */
|
|
160
|
+
readonly defaultAst?: ConstValueNode;
|
|
161
|
+
/** `@timestamp(operations)`. */
|
|
162
|
+
readonly timestamp?: readonly ("CREATE" | "UPDATE")[];
|
|
163
|
+
readonly cypher?: CypherAnnotation;
|
|
164
|
+
/** User `@deprecated(reason)` on the field. */
|
|
165
|
+
readonly deprecated?: string;
|
|
166
|
+
};
|
|
167
|
+
type Relationship = {
|
|
168
|
+
readonly name: string;
|
|
169
|
+
readonly source: string;
|
|
170
|
+
readonly target: string;
|
|
171
|
+
readonly type: string;
|
|
172
|
+
readonly direction: "IN" | "OUT";
|
|
173
|
+
/** Name of the `@relationshipProperties` type, if any. */
|
|
174
|
+
readonly properties?: string;
|
|
175
|
+
readonly list: boolean;
|
|
176
|
+
readonly required: boolean;
|
|
177
|
+
readonly elementRequired: boolean;
|
|
178
|
+
readonly description?: string;
|
|
179
|
+
readonly deprecated?: string;
|
|
180
|
+
};
|
|
181
|
+
type AuthRules = {
|
|
182
|
+
/** Operations covered by `@authentication` (all operations when the directive has no args). */
|
|
183
|
+
readonly authentication?: readonly string[];
|
|
184
|
+
/** `@authorization` present on the type. */
|
|
185
|
+
readonly authorization: boolean;
|
|
186
|
+
};
|
|
187
|
+
type NodeType = {
|
|
188
|
+
readonly name: string;
|
|
189
|
+
readonly description?: string;
|
|
190
|
+
/** Neo4j labels; the first is the main label. */
|
|
191
|
+
readonly labels: readonly string[];
|
|
192
|
+
/** Root list field, e.g. `movies`. */
|
|
193
|
+
readonly plural: string;
|
|
194
|
+
/** `Movies`. */
|
|
195
|
+
readonly pascalPlural: string;
|
|
196
|
+
readonly attributes: readonly Attribute[];
|
|
197
|
+
readonly relationships: readonly Relationship[];
|
|
198
|
+
readonly auth: AuthRules;
|
|
199
|
+
};
|
|
200
|
+
type PropertiesType = {
|
|
201
|
+
readonly name: string;
|
|
202
|
+
readonly attributes: readonly Attribute[];
|
|
203
|
+
};
|
|
204
|
+
type EnumType = {
|
|
205
|
+
readonly name: string;
|
|
206
|
+
readonly description?: string;
|
|
207
|
+
readonly values: readonly {
|
|
208
|
+
name: string;
|
|
209
|
+
description?: string;
|
|
210
|
+
deprecated?: string;
|
|
211
|
+
}[];
|
|
212
|
+
};
|
|
213
|
+
type V7Model = {
|
|
214
|
+
readonly nodes: readonly NodeType[];
|
|
215
|
+
readonly properties: ReadonlyMap<string, PropertiesType>;
|
|
216
|
+
readonly enums: ReadonlyMap<string, EnumType>;
|
|
217
|
+
node(name: string): NodeType;
|
|
218
|
+
};
|
|
219
|
+
/** The type definitions use a feature `@cyphra/graphql` cannot serve yet. */
|
|
220
|
+
declare class UnsupportedTypeDefsError extends Error {
|
|
221
|
+
name: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Read v7 type definitions. Throws {@link UnsupportedTypeDefsError} for features `@cyphra/graphql`
|
|
225
|
+
* does not serve yet (interfaces, unions, spatial and some temporal types, …), so the generated
|
|
226
|
+
* API never silently differs from v7.
|
|
227
|
+
*/
|
|
228
|
+
declare function readTypeDefs(typeDefs: string): V7Model;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Generates the GraphQL schema `@neo4j/graphql` v7 builds from type definitions: root queries and
|
|
232
|
+
* mutations, connection and edge types, every `where` / `sort` / `create` / `update` / `connect` /
|
|
233
|
+
* `disconnect` / `delete` input, aggregate selection types, and the deprecated `field_OPERATOR`
|
|
234
|
+
* fields v7 still prints. Names, descriptions and deprecation reasons are the v7 ones, so the
|
|
235
|
+
* printed SDL is identical.
|
|
236
|
+
*
|
|
237
|
+
* Only types reachable from `Query` / `Mutation` end up in the schema (as with v7).
|
|
238
|
+
*
|
|
239
|
+
* @packageDocumentation
|
|
240
|
+
*/
|
|
241
|
+
|
|
242
|
+
/** Builds the v7 schema (without resolvers) for a model. */
|
|
243
|
+
declare function buildV7Schema(model: V7Model): GraphQLSchema;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Compiles one v7 root query field (`movies`, `moviesConnection`) with its whole selection set into a
|
|
247
|
+
* single Cypher statement, plus a decoder that turns the returned value into the GraphQL result.
|
|
248
|
+
*
|
|
249
|
+
* Nested relationship fields become `COLLECT { … }` subqueries, connections become a `COUNT { … }`
|
|
250
|
+
* (for `totalCount` / `pageInfo`) and a `COLLECT { … }` of edges. Cursors are v7 offset cursors:
|
|
251
|
+
* `base64("arrayconnection:<offset>")`.
|
|
252
|
+
*
|
|
253
|
+
* Connection `aggregate` selections follow v7 7.6: `count.nodes` / `count.edges` count distinct
|
|
254
|
+
* nodes / relationships; each `node.<field>` / `edge.<field>` aggregate runs over the distinct nodes
|
|
255
|
+
* (relationships) matching the connection `where` (not `first` / `after`); `shortest` / `longest` are
|
|
256
|
+
* the last / first values ordered by `size(…)` descending; `sum` of an empty set is `0`, the other
|
|
257
|
+
* aggregates are `null`. Int `average` is a Float, BigInt values (including `average`) are strings.
|
|
258
|
+
*
|
|
259
|
+
* @packageDocumentation
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
declare function offsetToCursor(offset: number): string;
|
|
263
|
+
/** Offset of the cursor, or `undefined` when it is not a valid v7 cursor (first page then). */
|
|
264
|
+
declare function cursorToOffset(cursor: unknown): number | undefined;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* `@neo4j/graphql` v7 compatible API: the same generated schema, served on the Cyphra runtime.
|
|
268
|
+
*
|
|
269
|
+
* @packageDocumentation
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
type MakeSchemaOptions = ExecutorOptions & {
|
|
273
|
+
/** v7 type definitions (`@node`, `@relationship`, …). */
|
|
274
|
+
typeDefs: string;
|
|
275
|
+
};
|
|
276
|
+
/**
|
|
277
|
+
* Build the GraphQL schema `@neo4j/graphql` v7 generates for `typeDefs`, with resolvers that run on
|
|
278
|
+
* Neo4j through `driver` or `client`. Drop-in for `new Neo4jGraphQL({ typeDefs, driver }).getSchema()`.
|
|
279
|
+
*
|
|
280
|
+
* Today: the full v7 schema (SDL identical to v7), the read API (list and connection queries,
|
|
281
|
+
* filters, sorting, offset and cursor pagination, nested relationships and connections with edge
|
|
282
|
+
* properties, connection `aggregate` selections and aggregation filters) and mutations (create,
|
|
283
|
+
* update, delete with every nested operation and `info` counters). Authorization (#74) and
|
|
284
|
+
* `@cypher` fields (#75) are in the schema but answer with a "Not implemented yet" error.
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* ```ts
|
|
288
|
+
* import { compat } from "@cyphra/graphql";
|
|
289
|
+
* const schema = compat.v7.makeSchema({ typeDefs, driver });
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
declare function makeSchema(options: MakeSchemaOptions): GraphQLSchema;
|
|
293
|
+
/**
|
|
294
|
+
* The GraphQL `contextValue` for a request. v7 reads the decoded JWT from `context.jwt`; it is
|
|
295
|
+
* accepted for compatibility (authorization itself is #74).
|
|
296
|
+
*/
|
|
297
|
+
declare function contextFor(opts?: {
|
|
298
|
+
jwt?: Record<string, unknown>;
|
|
299
|
+
}): Record<string, unknown>;
|
|
300
|
+
/**
|
|
301
|
+
* The Cyphra schema for the same type definitions (through `convertGraphQLTypeDefs`, the converter
|
|
302
|
+
* behind `cyphra import graphql`): use it with `createOrm` to work on the graph the GraphQL API
|
|
303
|
+
* serves. `issues` lists what Cyphra models differently (e.g. `@cypher` fields are not converted).
|
|
304
|
+
*/
|
|
305
|
+
declare function cyphraSchema(typeDefs: string): {
|
|
306
|
+
document: SchemaDocument;
|
|
307
|
+
model: SchemaModel;
|
|
308
|
+
issues: readonly ImportIssue[];
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
type v7_MakeSchemaOptions = MakeSchemaOptions;
|
|
312
|
+
type v7_UnsupportedTypeDefsError = UnsupportedTypeDefsError;
|
|
313
|
+
declare const v7_UnsupportedTypeDefsError: typeof UnsupportedTypeDefsError;
|
|
314
|
+
type v7_V7Model = V7Model;
|
|
315
|
+
declare const v7_buildV7Schema: typeof buildV7Schema;
|
|
316
|
+
declare const v7_contextFor: typeof contextFor;
|
|
317
|
+
declare const v7_cursorToOffset: typeof cursorToOffset;
|
|
318
|
+
declare const v7_cyphraSchema: typeof cyphraSchema;
|
|
319
|
+
declare const v7_makeSchema: typeof makeSchema;
|
|
320
|
+
declare const v7_offsetToCursor: typeof offsetToCursor;
|
|
321
|
+
declare const v7_readTypeDefs: typeof readTypeDefs;
|
|
322
|
+
declare namespace v7 {
|
|
323
|
+
export { type v7_MakeSchemaOptions as MakeSchemaOptions, v7_UnsupportedTypeDefsError as UnsupportedTypeDefsError, type v7_V7Model as V7Model, v7_buildV7Schema as buildV7Schema, v7_contextFor as contextFor, v7_cursorToOffset as cursorToOffset, v7_cyphraSchema as cyphraSchema, v7_makeSchema as makeSchema, v7_offsetToCursor as offsetToCursor, v7_readTypeDefs as readTypeDefs };
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* GraphQL for Neo4j on the Cyphra runtime.
|
|
328
|
+
*
|
|
329
|
+
* `compat.v7` serves the API `@neo4j/graphql` v7 generates from the same type definitions, so
|
|
330
|
+
* frontends can switch without changing their queries.
|
|
331
|
+
*
|
|
332
|
+
* @packageDocumentation
|
|
333
|
+
*/
|
|
334
|
+
|
|
335
|
+
declare const compat: {
|
|
336
|
+
readonly v7: typeof v7;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export { GraphQLImportError, type GraphQLImportResult, type GraphQLSource, type ImportIssue, type ImportSeverity, type MakeSchemaOptions, UnsupportedTypeDefsError, compat, convertGraphQLTypeDefs, formatImportReport, mergeImportedSchema, printImportedSchema };
|